Integrand size = 24, antiderivative size = 93 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {5 \text {arctanh}(\sin (c+d x))}{2 a^3 d}-\frac {5 i \sec ^3(c+d x)}{3 a^3 d}+\frac {5 \sec (c+d x) \tan (c+d x)}{2 a^3 d}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2} \]
5/2*arctanh(sin(d*x+c))/a^3/d-5/3*I*sec(d*x+c)^3/a^3/d+5/2*sec(d*x+c)*tan( d*x+c)/a^3/d-2*I*sec(d*x+c)^5/a/d/(a+I*a*tan(d*x+c))^2
Time = 0.83 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.68 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {60 \text {arctanh}\left (\sin (c)+\cos (c) \tan \left (\frac {d x}{2}\right )\right )-i \sec ^3(c+d x) (20+24 \cos (2 (c+d x))-9 i \sin (2 (c+d x)))}{12 a^3 d} \]
(60*ArcTanh[Sin[c] + Cos[c]*Tan[(d*x)/2]] - I*Sec[c + d*x]^3*(20 + 24*Cos[ 2*(c + d*x)] - (9*I)*Sin[2*(c + d*x)]))/(12*a^3*d)
Time = 0.52 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 3981, 3042, 3982, 3042, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sec (c+d x)^7}{(a+i a \tan (c+d x))^3}dx\) |
\(\Big \downarrow \) 3981 |
\(\displaystyle \frac {5 \int \frac {\sec ^5(c+d x)}{i \tan (c+d x) a+a}dx}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \int \frac {\sec (c+d x)^5}{i \tan (c+d x) a+a}dx}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 3982 |
\(\displaystyle \frac {5 \left (\frac {\int \sec ^3(c+d x)dx}{a}-\frac {i \sec ^3(c+d x)}{3 a d}\right )}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \left (\frac {\int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a}-\frac {i \sec ^3(c+d x)}{3 a d}\right )}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle \frac {5 \left (\frac {\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {i \sec ^3(c+d x)}{3 a d}\right )}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {5 \left (\frac {\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {i \sec ^3(c+d x)}{3 a d}\right )}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {5 \left (\frac {\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}}{a}-\frac {i \sec ^3(c+d x)}{3 a d}\right )}{a^2}-\frac {2 i \sec ^5(c+d x)}{a d (a+i a \tan (c+d x))^2}\) |
((-2*I)*Sec[c + d*x]^5)/(a*d*(a + I*a*Tan[c + d*x])^2) + (5*(((-1/3*I)*Sec [c + d*x]^3)/(a*d) + (ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d*x])/(2*d))/a))/a^2
3.2.41.3.1 Defintions of rubi rules used
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_), x_Symbol] :> Simp[2*d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + 2*n))), x] - Simp[d^2*((m - 2)/(b^2*(m + 2*n))) Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 2), x], x] /; FreeQ[ {a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, -1] && ((ILtQ[n/2, 0] && IGtQ[m - 1/2, 0]) || EqQ[n, -2] || IGtQ[m + n, 0] || (IntegersQ[n, m + 1/2] && GtQ[2*m + n + 1, 0])) && IntegerQ[2*m]
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[d^2*(d*Sec[e + f*x])^(m - 2)*((a + b*Tan[e + f*x])^(n + 1)/(b*f*(m + n - 1))), x] + Simp[d^2*((m - 2)/(a*(m + n - 1))) Int[(d*Sec[e + f*x])^(m - 2)*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ [{a, b, d, e, f}, x] && EqQ[a^2 + b^2, 0] && LtQ[n, 0] && GtQ[m, 1] && !IL tQ[m + n, 0] && NeQ[m + n - 1, 0] && IntegersQ[2*m, 2*n]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Time = 0.85 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.08
method | result | size |
risch | \(-\frac {i \left (15 \,{\mathrm e}^{5 i \left (d x +c \right )}+40 \,{\mathrm e}^{3 i \left (d x +c \right )}+33 \,{\mathrm e}^{i \left (d x +c \right )}\right )}{3 d \,a^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 a^{3} d}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 a^{3} d}\) | \(100\) |
derivativedivides | \(\frac {\frac {i}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (\frac {3}{4}-\frac {i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (-\frac {3}{4}-\frac {7 i}{4}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}-\frac {i}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {3}{4}-\frac {i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {3}{4}+\frac {7 i}{4}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}}{a^{3} d}\) | \(138\) |
default | \(\frac {\frac {i}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}+\frac {2 \left (\frac {3}{4}-\frac {i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\frac {2 \left (-\frac {3}{4}-\frac {7 i}{4}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}+\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2}-\frac {i}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}+\frac {2 \left (-\frac {3}{4}-\frac {i}{4}\right )}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\frac {2 \left (-\frac {3}{4}+\frac {7 i}{4}\right )}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2}}{a^{3} d}\) | \(138\) |
-1/3*I/d/a^3/(exp(2*I*(d*x+c))+1)^3*(15*exp(5*I*(d*x+c))+40*exp(3*I*(d*x+c ))+33*exp(I*(d*x+c)))+5/2/a^3/d*ln(exp(I*(d*x+c))+I)-5/2/a^3/d*ln(exp(I*(d *x+c))-I)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 182 vs. \(2 (81) = 162\).
Time = 0.24 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.96 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {15 \, {\left (e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 15 \, {\left (e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 30 i \, e^{\left (5 i \, d x + 5 i \, c\right )} - 80 i \, e^{\left (3 i \, d x + 3 i \, c\right )} - 66 i \, e^{\left (i \, d x + i \, c\right )}}{6 \, {\left (a^{3} d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, a^{3} d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, a^{3} d e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3} d\right )}} \]
1/6*(15*(e^(6*I*d*x + 6*I*c) + 3*e^(4*I*d*x + 4*I*c) + 3*e^(2*I*d*x + 2*I* c) + 1)*log(e^(I*d*x + I*c) + I) - 15*(e^(6*I*d*x + 6*I*c) + 3*e^(4*I*d*x + 4*I*c) + 3*e^(2*I*d*x + 2*I*c) + 1)*log(e^(I*d*x + I*c) - I) - 30*I*e^(5 *I*d*x + 5*I*c) - 80*I*e^(3*I*d*x + 3*I*c) - 66*I*e^(I*d*x + I*c))/(a^3*d* e^(6*I*d*x + 6*I*c) + 3*a^3*d*e^(4*I*d*x + 4*I*c) + 3*a^3*d*e^(2*I*d*x + 2 *I*c) + a^3*d)
\[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {i \int \frac {\sec ^{7}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx}{a^{3}} \]
I*Integral(sec(c + d*x)**7/(tan(c + d*x)**3 - 3*I*tan(c + d*x)**2 - 3*tan( c + d*x) + I), x)/a**3
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 215 vs. \(2 (81) = 162\).
Time = 0.32 (sec) , antiderivative size = 215, normalized size of antiderivative = 2.31 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {\frac {4 \, {\left (-\frac {9 i \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {48 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {18 \, \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} + \frac {9 i \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} + 22\right )}}{6 i \, a^{3} - \frac {18 i \, a^{3} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {18 i \, a^{3} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {6 i \, a^{3} \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} + \frac {5 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} - \frac {5 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}}}{2 \, d} \]
1/2*(4*(-9*I*sin(d*x + c)/(cos(d*x + c) + 1) - 48*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 18*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 + 9*I*sin(d*x + c)^5/ (cos(d*x + c) + 1)^5 + 22)/(6*I*a^3 - 18*I*a^3*sin(d*x + c)^2/(cos(d*x + c ) + 1)^2 + 18*I*a^3*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - 6*I*a^3*sin(d*x + c)^6/(cos(d*x + c) + 1)^6) + 5*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/ a^3 - 5*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^3)/d
Time = 0.62 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.20 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {\frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a^{3}} - \frac {15 \, \log \left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}{a^{3}} - \frac {2 \, {\left (9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 18 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 48 i \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 22 i\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a^{3}}}{6 \, d} \]
1/6*(15*log(tan(1/2*d*x + 1/2*c) + 1)/a^3 - 15*log(tan(1/2*d*x + 1/2*c) - 1)/a^3 - 2*(9*tan(1/2*d*x + 1/2*c)^5 - 18*I*tan(1/2*d*x + 1/2*c)^4 + 48*I* tan(1/2*d*x + 1/2*c)^2 - 9*tan(1/2*d*x + 1/2*c) - 22*I)/((tan(1/2*d*x + 1/ 2*c)^2 - 1)^3*a^3))/d
Time = 6.07 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.45 \[ \int \frac {\sec ^7(c+d x)}{(a+i a \tan (c+d x))^3} \, dx=\frac {5\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^3\,d}+\frac {\frac {3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^3}-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{a^3}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,16{}\mathrm {i}}{a^3}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,6{}\mathrm {i}}{a^3}+\frac {22{}\mathrm {i}}{3\,a^3}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]